package com.wsoft.system.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wsoft.entity.TsJobLogEntity;
import com.wsoft.system.manager.TsJobLogManager;
import com.wsoft.system.mapper.TsJobLogMapper;
import com.wsoft.query.job.log.JobLogListQuery;
import com.wsoft.system.service.ITsJobLogService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 定时任务日志表 服务实现类
 * </p>
 *
 * @author z001
 * @since 2024年10月23日 08:16:48
 */
@Service
public class TsJobLogServiceImpl extends ServiceImpl<TsJobLogMapper, TsJobLogEntity> implements ITsJobLogService {

    @Resource
    private TsJobLogManager jobLogManager;

    /**
     *查询日志列表
     * @param query
     * @return
     */
    @Override
    public PageInfo<TsJobLogEntity> listJobLog(JobLogListQuery query) {
        PageHelper.startPage(query.getPageNum(), query.getPageSize());
        List<TsJobLogEntity> list = jobLogManager.listJobLog(query);
        return PageInfo.of(list);
    }
}
